﻿using System;
using System.Web.Services;
using Besture.Bll;
using Besture.Common;
using Besture.Common.Helper;
using Besture.Model;
using Besture.UI.Common;

namespace Besture.UI.Portal.UserCenter
{
    public partial class UserInfo : UserPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {

                UserNav.Selected[0] = "on";
                if (!IsPostBack)
                {
                    GetLogin();
                    txtPhone.Text = LoginUserInfo.Phone == "" ? "未设置" : LoginUserInfo.Phone;
                    hidPhone.Value = LoginUserInfo.Phone;

                    txtEmail.Text = LoginUserInfo.Email == "" ? "未设置" : LoginUserInfo.Email;
                    hidEmail.Value = LoginUserInfo.Email;
                    var vdt = QueryDac.GetTable(string.Format("SELECT * FROM dbo.TBProvince WHERE ProID={0}", LoginUserInfo.ProvinceID));
                    lblProvince.InnerText = vdt.Rows[0]["ProName"].ToString().Length>0 ? vdt.Rows[0]["ProName"].ToString():"未设置";

                }
            }catch{}

        }
    }
}